home *** CD-ROM | disk | FTP | other *** search
/ Merciful 4 / Merciful - Disc 4.iso / rexx / help.pprx < prev    next >
Text File  |  1996-11-01  |  3KB  |  115 lines

  1. /* Personal Paint Amiga Rexx script - Copyright © 1995-1996 Cloanto Italia srl */
  2.  
  3. /* $VER: Help.pprx 1.1 */
  4.  
  5. /** ENG
  6.  This script displays a list of all Rexx commands and options.
  7.  
  8.  The script can be executed with an argument, which is passed on to the
  9.  "Help" command, and which causes instructions to be displayed either for
  10.  the internal commands and options, or for the I/O modules, or for both.
  11.  
  12.  Additional information and support is available via E-mail from Cloanto.
  13.  E-mail: <support@cloanto.com>.
  14. */
  15.  
  16. /** DEU
  17.  Dieses Skript zeigt eine Liste aller Rexx-Befehle und -Optionen.
  18.  
  19.  Es läßt sich mit einem optionalen Argument ausführen, welches an
  20.  den Befehl "Help" übergeben wird und dazu führt, daß entweder
  21.  Hinweise zu den internen Befehlen und Optionen, zu den E/A-Modulen,
  22.  oder zu beiden Themenbereichen ausgegeben werden.
  23.  
  24.  Zusätzliche Informationen und Hilfestellungen erhalten Sie via
  25.  E-Mail direkt von Cloanto unter <support@cloanto.com>.
  26. */
  27.  
  28. IF ARG(1, EXISTS) THEN
  29.     PARSE ARG PPPORT topic output '"' title '"'
  30. ELSE
  31.     PPPORT = 'PPAINT'
  32.  
  33.  
  34. IF ~SHOW('P', PPPORT) THEN DO
  35.     IF EXISTS('PPaint:PPaint') THEN DO
  36.         ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
  37.         DO 30 WHILE ~SHOW('P',PPPORT)
  38.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  39.         END
  40.     END
  41.     ELSE DO
  42.         SAY "Personal Paint could not be loaded."
  43.         EXIT 10
  44.     END
  45. END
  46.  
  47. IF ~SHOW('P', PPPORT) THEN DO
  48.     SAY 'Personal Paint Rexx port could not be opened'
  49.     EXIT 10
  50. END
  51.  
  52. ADDRESS VALUE PPPORT
  53. OPTIONS RESULTS
  54. OPTIONS FAILAT 10000
  55.  
  56. Get 'LANG'
  57. IF RESULT = 1 THEN DO        /* Deutsch */
  58.     txt_port_name     = 'Port Name: '        /* ***ENG */
  59.     txt_rexx_ver      = 'Rexx Version: '
  60.     txt_rexx_version  = '-- PPaint Rexx Version '
  61.     txt_io_modules    = '-- Available I/O Modules --'
  62.     txt_err_oldclient = 'Für dieses Skript_ist eine neuere Version_von Personal Paint erforderlich'
  63. END
  64. ELSE IF RESULT = 2 THEN DO    /* Italiano */
  65.     txt_port_name     = 'Nome porta Rexx: '
  66.     txt_rexx_ver      = 'Versione Rexx: '
  67.     txt_rexx_version  = '-- Versione Rexx PPaint '
  68.     txt_io_modules    = '-- Moduli I/O disponibili --'
  69.     txt_err_oldclient = 'Questa procedura richiede_una versione più recente_di Personal Paint'
  70. END
  71. ELSE DO                /* English */
  72.     txt_port_name     = 'Port Name: '
  73.     txt_rexx_ver      = 'Rexx Version: '
  74.     txt_rexx_version  = '-- PPaint Rexx Version '
  75.     txt_io_modules    = '-- Available I/O Modules --'
  76.     txt_err_oldclient = 'This script requires a newer_version of Personal Paint'
  77. END
  78.  
  79. Version 'REXX'
  80. IF RESULT < 3 THEN DO
  81.     RequestNotify 'PROMPT "'txt_err_oldclient'"'
  82.     EXIT 10
  83. END
  84.  
  85. IF output = 'GUI' THEN DO
  86.     Help topic
  87.     helptext = RESULT
  88.     IF topic = 'Command' THEN DO
  89.         Version 'REXX'
  90.         helptext = txt_port_name || PPPORT '0a'X || txt_rexx_ver || RESULT '0a0a'X || helptext
  91.     END
  92.  
  93.     pos = 1
  94.     DO FOREVER
  95.         pos = INDEX(helptext, '"', pos)
  96.         IF pos = 0 THEN
  97.             BREAK
  98.         helptext = INSERT('"', helptext, pos)
  99.         pos = pos + 2
  100.     END
  101.  
  102.     RequestNotify '"'title'" "'helptext'" SCROLL'
  103. END
  104. ELSE DO
  105.     SAY txt_rexx_version || RESULT '--' '0a'X
  106.  
  107.     Help
  108.     SAY RESULT
  109.  
  110.     SAY '0a0a'X || txt_io_modules '0a'X
  111.  
  112.     Help 'IOFORMAT'
  113.     SAY RESULT
  114. END
  115.